@layout("/backend/common/_container.html"){
<body>
<div class="hisui-panel" title="已开展病种列表" data-options="headerCls:'panel-header-gray',tools:'#tt'">
    <div id='tt'>
        <a href="#" class="icon-download" id="exportTable" title="导出表格" onclick="DevListOfDis.exportTable()"></a>
    </div>
    <div style="display:none  ">
        <table id="devlistofdisTableHead"></table>
    </div>
    <div id="devlistofdisTableDiv" style="height:auto; ">
        <table style="width:100%;" id="devlistofdisTable">
        </table>
    </div>
</div>


</body>

<script language="javascript" type="text/javascript">
    DevListOfDis = {}
    $(function () {
        DevListOfDis.initChartTable();
    });
    // 绘制表格
    DevListOfDis.initChartTable = function () {
        var params = {};
        var ajax = new $ax(Sys.backendPath + "/analysis/qcportal/selectdevlist", function (data) {
            this.$table =
                $('#devlistofdisTable').bootstrapTable({
                    data: data.declist,
                    striped: false,//是否显示行间隔色
                    pagination: false,//是否显示分页
                    showFooter: false,
                    paginationLoop: false,
                    pageSize: 10,//用于设置每页初始显示的条数
                    pageList: [4],
                    sidePagination: 'client',//设置在哪进行分页，默认”client”，可选”server”,返回数据模板不同
                    sortName: 'patCount',
                    sortOrder: 'desc',// desc  asc
                    maintainSelected: true,//设为true 为选中的状态
                    cache: false,
                    search: false, //搜索框
                    columns: [
                        {
                            title: '已开展病种',
                            field: 'description',
                            width: '30%',
                            align: 'center',
                            valign: 'middle',
                            sortable: true,
                        },
                        {
                            title: '累计上报例数',
                            field: 'patCount',
                            width: '15%',
                            align: 'center',
                            valign: 'middle',
                            sortable: true,
                        },
                        {
                            title: '最早上报时间',
                            field: 'earlyDate',
                            width: '25%',
                            align: 'center',
                            valign: 'middle',
                            sortable: true,
                        },
                        {
                            title: '最近上报时间',
                            field: 'recentDate',
                            width: '25%',
                            align: 'center',
                            valign: 'middle',
                            sortable: true,
                        },
                    ],
                    onPostHeader: function () {  //当<thead></thead>中的内容被加载完后或者在你所用的DOM中有定义则被触发
                        //$(".th-inner").css("font-weight","700");//表头字体加粗
                        $("#devlistofdisTable > tbody td").each(function (index) {//鼠标悬浮 显示表格数据
                            $(this).attr("title", $(this).text());
                        });
                    }
                });
        }, function (data) {
        });
        ajax.set(params);
        ajax.start();
    }
    // 导出表格
    DevListOfDis.exportTable = function () {
        $("#devlistofdisTableHead,#devlistofdisTable,.fixed-table-footer>table").tableExport(
            {
                type: 'xlsx',
                escape: 'false'
            }, "已开展病种"
        )
    };
</script>
@}